{extend name='public/list'/}
{block name='fields'}
<div class="layui-inline">
    <label class="layui-form-label">订单号</label>
    <div class="layui-input-block">
        <input type="text" name="ord_no" value="" placeholder="订单号" class="layui-input">
    </div>
</div>
<div class="layui-inline">
    <label class="layui-form-label">快递号</label>
    <div class="layui-input-block">
        <input type="text" name="express_no" value="" placeholder="快递单号" class="layui-input">
    </div>
</div>
{/block}

<!-- 头工具栏 -->
{block name='toolbar'}
<script type="text/html" id="toolbar">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm" lay-event="delAll">批量删除</button>
        <button class="layui-btn layui-btn-sm" lay-event="refresh"><i class="layui-icon layui-icon-refresh"></i></button>
    </div>
</script>
{/block}

<!-- 行工具 -->
{block name='databar'}
<script type="text/html" id="databar">
    <a class="layui-btn layui-btn layui-btn-xs layui-btn-primary" onclick="details({{d.id}})">商品详情</a>
    <a class="layui-btn layui-btn layui-btn-xs" lay-event="edit">编辑</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>
{/block}

{block name='js'}
<script>
    var cols = [
        [{
            checkbox: true,
            fixed: 'left',
        }, {
            field: 'id',
            title: 'ID',
            sort: true,
            width: 80,
        }, {
            field: 'uphone',
            title: '用户',
            sort: true,
        }, {
            field: 'ord_no',
            title: '订单号',
            sort: true,
        }, {
            field: 'money',
            title: '订单金额',
        }, {
            field: 'product',
            title: '订单商品',
        }, {
            field: 'add_time',
            title: '下单时间',
            sort: true,
        }, {
            field: 'express_no',
            title: '快递单号',
            sort: true,
        }, {
            field: 'express_name',
            title: '快递名称',
        }, {
            field: 'status_text',
            title: '状态',
        }, {
            title: '操作',
            align: 'center',
            width: 200,
            toolbar: '#databar'
        }]
    ];

    function details(id) {
        var index = layer.open({
            title: 'sku商品详情',
            type: 2,//1 dom或文本，2 iframe,3 加载层,4 tips
            shadeClose: true,
            maxmin: true,
            area: ['760px', '450px'],
            content: '/admins/orders/orders_product?id=' + id
        });
        // 全屏
        // layer.full(index);
    }
</script>
{/block}